package com.vincent.message;

import com.vincent.common.Command;
import com.vincent.common.Message;
import com.vincent.common.MessageType;

/**
 * Created by wensen on 2016/12/8.
 *
 * 由lcient发送给replica的信息，包含了command
 *
 */
public class RequestMessage extends Message{

    private Command command;

    public RequestMessage(int src, Command cmd) {
        super(src);
        this.command = cmd;
    }

    public Command command() {
        return this.command;
    }

    public int messageType() {
        return MessageType.REQUEST_MESSAGE;
    }

    public String toString() {
        return "{Request Message [command: " + command + "]}";
    }
}
